<!DOCTYPE html><!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]--><!--[if gt IE 8]><!--><html class="no-js" lang="en"><!--<![endif]--><head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title></title>
  

  
  <link href="https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700" rel="stylesheet" type="text/css">

  <link rel="stylesheet" href="/v2/css/theme.css" type="text/css">
  <link href="/v2/css/custom.css" rel="stylesheet">

  <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
  <script src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js"></script>
  <script src="../../js/theme.js"></script>
  <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script>
  <script src="../../search/main.js"></script>

  <style>
    body {font-size: 90%;}
    pre, code {font-size: 100%;}
    h3, h4, h5, h6 {color: #2980b9; font-weight: 300}
  </style> 
<meta name="robots" content="noindex"></head>

<body class="wy-body-for-nav" role="document">

  <div class="wy-grid-for-nav">

    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
      <div class="wy-side-nav-search">
        <a href="/v2/" class="icon icon-home"> </a>
        <div role="search">
  <form id="rtd-search-form" class="wy-form" action="" method="get">
    <input type="text" name="q" placeholder="Search docs">
    <input type="hidden" name="check_keywords" value="yes">
    <input type="hidden" name="area" value="default">
  </form>
</div>
      </div>

      <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
      <ul class="current">
   
  <span class="toctree-l0">Home</span>
  
  <li class="toctree-l1 ">
    <a class="" href="/v2/">Welcome</a>
    
  </li>
  
  <li class="toctree-l1 ">
    <a class="" href="/v2/imprint/">Imprint</a>
    
  </li>
     
  <span class="toctree-l0">Articles</span>
  
  <li class="toctree-l1 ">
    <a class="" href="/v2/articles/getting-started/">Getting started</a>
    
  </li>
  
  <li class="toctree-l1 ">
    <a class="" href="/v2/articles/heroku/">Heroku</a>
    
  </li>
  
  <li class="toctree-l1 ">
    <a class="" href="/v2/articles/express/">Usage with Express.JS</a>
    
  </li>
     
  <span class="toctree-l0">Docs</span>
  
  <li class="toctree-l1 ">
    <a class="" href="/v2/docs/installation/">Installation</a>
    
  </li>
  
  <li class="toctree-l1 ">
    <a class="" href="/v2/docs/usage/">Usage</a>
    
  </li>
  
  <li class="toctree-l1 ">
    <a class="" href="/v2/docs/promises/">Promises</a>
    
  </li>
  
  <li class="toctree-l1 ">
    <a class="" href="/v2/docs/models/">Models</a>
    
  </li>
  
  <li class="toctree-l1 ">
    <a class="" href="/v2/docs/instances/">Instances</a>
    
  </li>
  
  <li class="toctree-l1 ">
    <a class="" href="/v2/docs/associations/">Associations</a>
    
  </li>
  
  <li class="toctree-l1 ">
    <a class="" href="/v2/docs/hooks/">Hooks</a>
    
  </li>
  
  <li class="toctree-l1 ">
    <a class="" href="/v2/docs/transactions/">Transactions</a>
    
  </li>
  
  <li class="toctree-l1 ">
    <a class="" href="/v2/docs/migrations/">Migrations</a>
    
  </li>
  
  <li class="toctree-l1 ">
    <a class="" href="/v2/docs/misc/">Misc</a>
    
  </li>
     
  <span class="toctree-l0">API</span>
  
  <li class="toctree-l1 ">
    <a class="" href="/v2/api/sequelize/">Sequelize</a>
    
  </li>
  
  <li class="toctree-l1 ">
    <a class="" href="/v2/api/model/">Model</a>
    
  </li>
  
  <li class="toctree-l1 ">
    <a class="" href="/v2/api/instance/">Instance</a>
    
  </li>
  
  <li class="toctree-l1 ">
    <a class="" href="/v2/api/associations/">Associations</a>
    
  </li>
  
  <li class="toctree-l1 current">
    <a class="current" href="/v2/api/hooks/">Hooks</a>
    
    <ul>
      
    </ul>
    
  </li>
  
  <li class="toctree-l1 ">
    <a class="" href="/v2/api/promise/">Promise</a>
    
  </li>
  
  <li class="toctree-l1 ">
    <a class="" href="/v2/api/transaction/">Transaction</a>
    
  </li>
  
  <li class="toctree-l1 ">
    <a class="" href="/v2/api/datatypes/">Datatypes</a>
    
  </li>
  
  <li class="toctree-l1 ">
    <a class="" href="/v2/api/errors/">Errors</a>
    
  </li>
    
</ul>
      </div>
      &nbsp;
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
        <i data-toggle="wy-nav-top" class="icon icon-reorder"></i>
        <a href="/v2/"></a>
      </nav>

      
      <div class="wy-nav-content">
        <div class="rst-content">
          <div role="navigation" aria-label="breadcrumbs navigation">
  <ul class="wy-breadcrumbs">
    <li><a href="/v2/">Docs</a> »</li>
    <li>Hooks</li>
      <li class="wy-breadcrumbs-aside">
        
      </li>
  </ul>
  <hr>
</div>
          <div role="main">
            <div class="section">
              <p><a name="hooks"></a></p>
<h1 id="mixin-hooks">Mixin Hooks</h1>
<p><a href="https://github.com/sequelize/sequelize/blob/5aa77fa291abeaf0498f65724000c75da9ab9028/lib/hooks.js#L37">View code</a>
Hooks are function that are called before and after  (bulk-) creation/updating/deletion and validation. Hooks can be added to you models in three ways:</p>
<ol>
<li>By specifying them as options in <code>sequelize.define</code></li>
<li>By calling <code>hook()</code> with a string and your hook handler function</li>
<li>By calling the function with the same name as the hook you want</li>
</ol>
<pre><code class="language-js">// Method 1
sequelize.define(name, { attributes }, {
  hooks: {
    beforeBulkCreate: function () {
      // can be a single function
    },
    beforeValidate: [
      function () {},
      function() {} // Or an array of several
    ]
  }
})

// Method 2
Model.hook('afterDestroy', function () {})

// Method 3
Model.afterBulkUpdate(function () {})
</code></pre>
<p><strong>See:</strong></p>
<ul>
<li><a href="/v2/sequelize#define">Sequelize#define</a></li>
</ul>
<hr>
<p><a name="addhook"></a></p>
<h2 id="addhookhooktype-name-fn"><code>addHook(hooktype, [name], fn)</code></h2>
<p><a href="https://github.com/sequelize/sequelize/blob/5aa77fa291abeaf0498f65724000c75da9ab9028/lib/hooks.js#L149">View code</a>
Add a hook to the model</p>
<p><strong>Params:</strong></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>hooktype</td>
<td>String</td>
<td></td>
</tr>
<tr>
<td>[name]</td>
<td>String</td>
<td>Provide a name for the hook function. This serves no purpose, other than the ability to be able to order hooks based on some sort of priority system in the future.</td>
</tr>
<tr>
<td>fn</td>
<td>Function</td>
<td>The hook function</td>
</tr>
</tbody>
</table>
<p><strong>Aliases:</strong> hook</p>
<hr>
<p><a name="beforevalidate"></a></p>
<h2 id="beforevalidatename-fn"><code>beforeValidate(name, fn)</code></h2>
<p><a href="https://github.com/sequelize/sequelize/blob/5aa77fa291abeaf0498f65724000c75da9ab9028/lib/hooks.js#L169">View code</a>
A hook that is run before validation</p>
<p><strong>Params:</strong></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>String</td>
<td></td>
</tr>
<tr>
<td>fn</td>
<td>Function</td>
<td>A callback function that is called with instance, options, callback(err)</td>
</tr>
</tbody>
</table>
<hr>
<p><a name="aftervalidate"></a></p>
<h2 id="aftervalidatename-fn"><code>afterValidate(name, fn)</code></h2>
<p><a href="https://github.com/sequelize/sequelize/blob/5aa77fa291abeaf0498f65724000c75da9ab9028/lib/hooks.js#L178">View code</a>
A hook that is run after validation</p>
<p><strong>Params:</strong></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>String</td>
<td></td>
</tr>
<tr>
<td>fn</td>
<td>Function</td>
<td>A callback function that is called with instance, options, callback(err)</td>
</tr>
</tbody>
</table>
<hr>
<p><a name="beforecreate"></a></p>
<h2 id="beforecreatename-fn"><code>beforeCreate(name, fn)</code></h2>
<p><a href="https://github.com/sequelize/sequelize/blob/5aa77fa291abeaf0498f65724000c75da9ab9028/lib/hooks.js#L187">View code</a>
A hook that is run before creating a single instance</p>
<p><strong>Params:</strong></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>String</td>
<td></td>
</tr>
<tr>
<td>fn</td>
<td>Function</td>
<td>A callback function that is called with attributes, options, callback(err)</td>
</tr>
</tbody>
</table>
<hr>
<p><a name="aftercreate"></a></p>
<h2 id="aftercreatename-fn"><code>afterCreate(name, fn)</code></h2>
<p><a href="https://github.com/sequelize/sequelize/blob/5aa77fa291abeaf0498f65724000c75da9ab9028/lib/hooks.js#L196">View code</a>
A hook that is run after creating a single instance</p>
<p><strong>Params:</strong></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>String</td>
<td></td>
</tr>
<tr>
<td>fn</td>
<td>Function</td>
<td>A callback function that is called with attributes, options, callback(err)</td>
</tr>
</tbody>
</table>
<hr>
<p><a name="beforedestroy"></a></p>
<h2 id="beforedestroyname-fn"><code>beforeDestroy(name, fn)</code></h2>
<p><a href="https://github.com/sequelize/sequelize/blob/5aa77fa291abeaf0498f65724000c75da9ab9028/lib/hooks.js#L207">View code</a>
A hook that is run before destroying a single instance</p>
<p><strong>Params:</strong></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>String</td>
<td></td>
</tr>
<tr>
<td>fn</td>
<td>Function</td>
<td>A callback function that is called with instance, options, callback(err)</td>
</tr>
</tbody>
</table>
<p><strong>Aliases:</strong> beforeDelete</p>
<hr>
<p><a name="afterdestroy"></a></p>
<h2 id="afterdestroyname-fn"><code>afterDestroy(name, fn)</code></h2>
<p><a href="https://github.com/sequelize/sequelize/blob/5aa77fa291abeaf0498f65724000c75da9ab9028/lib/hooks.js#L222">View code</a>
A hook that is run after destroying a single instance</p>
<p><strong>Params:</strong></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>String</td>
<td></td>
</tr>
<tr>
<td>fn</td>
<td>Function</td>
<td>A callback function that is called with instance, options, callback(err)</td>
</tr>
</tbody>
</table>
<p><strong>Aliases:</strong> afterDelete</p>
<hr>
<p><a name="beforeupdate"></a></p>
<h2 id="beforeupdatename-fn"><code>beforeUpdate(name, fn)</code></h2>
<p><a href="https://github.com/sequelize/sequelize/blob/5aa77fa291abeaf0498f65724000c75da9ab9028/lib/hooks.js#L235">View code</a>
A hook that is run before updating a single instance</p>
<p><strong>Params:</strong></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>String</td>
<td></td>
</tr>
<tr>
<td>fn</td>
<td>Function</td>
<td>A callback function that is called with instance, options, callback(err)</td>
</tr>
</tbody>
</table>
<hr>
<p><a name="afterupdate"></a></p>
<h2 id="afterupdatename-fn"><code>afterUpdate(name, fn)</code></h2>
<p><a href="https://github.com/sequelize/sequelize/blob/5aa77fa291abeaf0498f65724000c75da9ab9028/lib/hooks.js#L244">View code</a>
A hook that is run after updating a single instance</p>
<p><strong>Params:</strong></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>String</td>
<td></td>
</tr>
<tr>
<td>fn</td>
<td>Function</td>
<td>A callback function that is called with instance, options, callback(err)</td>
</tr>
</tbody>
</table>
<hr>
<p><a name="beforebulkcreate"></a></p>
<h2 id="beforebulkcreatename-fn"><code>beforeBulkCreate(name, fn)</code></h2>
<p><a href="https://github.com/sequelize/sequelize/blob/5aa77fa291abeaf0498f65724000c75da9ab9028/lib/hooks.js#L253">View code</a>
A hook that is run before creating instances in bulk</p>
<p><strong>Params:</strong></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>String</td>
<td></td>
</tr>
<tr>
<td>fn</td>
<td>Function</td>
<td>A callback function that is called with instances, options, callback(err)</td>
</tr>
</tbody>
</table>
<hr>
<p><a name="afterbulkcreate"></a></p>
<h2 id="afterbulkcreatename-fn"><code>afterBulkCreate(name, fn)</code></h2>
<p><a href="https://github.com/sequelize/sequelize/blob/5aa77fa291abeaf0498f65724000c75da9ab9028/lib/hooks.js#L262">View code</a>
A hook that is run after creating instances in bulk</p>
<p><strong>Params:</strong></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>String</td>
<td></td>
</tr>
<tr>
<td>fn</td>
<td>Function</td>
<td>A callback function that is called with instances, options, callback(err)</td>
</tr>
</tbody>
</table>
<hr>
<p><a name="beforebulkdestroy"></a></p>
<h2 id="beforebulkdestroyname-fn"><code>beforeBulkDestroy(name, fn)</code></h2>
<p><a href="https://github.com/sequelize/sequelize/blob/5aa77fa291abeaf0498f65724000c75da9ab9028/lib/hooks.js#L273">View code</a>
A hook that is run before destroying instances in bulk</p>
<p><strong>Params:</strong></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>String</td>
<td></td>
</tr>
<tr>
<td>fn</td>
<td>Function</td>
<td>A callback function that is called with options, callback(err)</td>
</tr>
</tbody>
</table>
<p><strong>Aliases:</strong> beforeBulkDelete</p>
<hr>
<p><a name="afterbulkdestroy"></a></p>
<h2 id="afterbulkdestroyname-fn"><code>afterBulkDestroy(name, fn)</code></h2>
<p><a href="https://github.com/sequelize/sequelize/blob/5aa77fa291abeaf0498f65724000c75da9ab9028/lib/hooks.js#L288">View code</a>
A hook that is run after destroying instances in bulk</p>
<p><strong>Params:</strong></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>String</td>
<td></td>
</tr>
<tr>
<td>fn</td>
<td>Function</td>
<td>A callback function that is called with options, callback(err)</td>
</tr>
</tbody>
</table>
<p><strong>Aliases:</strong> afterBulkDelete</p>
<hr>
<p><a name="beforebulkupdate"></a></p>
<h2 id="beforebulkupdatename-fn"><code>beforeBulkUpdate(name, fn)</code></h2>
<p><a href="https://github.com/sequelize/sequelize/blob/5aa77fa291abeaf0498f65724000c75da9ab9028/lib/hooks.js#L301">View code</a>
A hook that is run after updating instances in bulk</p>
<p><strong>Params:</strong></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>String</td>
<td></td>
</tr>
<tr>
<td>fn</td>
<td>Function</td>
<td>A callback function that is called with options, callback(err)</td>
</tr>
</tbody>
</table>
<hr>
<p><a name="afterbulkupdate"></a></p>
<h2 id="afterbulkupdatename-fn"><code>afterBulkUpdate(name, fn)</code></h2>
<p><a href="https://github.com/sequelize/sequelize/blob/5aa77fa291abeaf0498f65724000c75da9ab9028/lib/hooks.js#L310">View code</a>
A hook that is run after updating instances in bulk</p>
<p><strong>Params:</strong></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>String</td>
<td></td>
</tr>
<tr>
<td>fn</td>
<td>Function</td>
<td>A callback function that is called with options, callback(err)</td>
</tr>
</tbody>
</table>
<hr>
<p><a name="beforefind"></a></p>
<h2 id="beforefindname-fn"><code>beforeFind(name, fn)</code></h2>
<p><a href="https://github.com/sequelize/sequelize/blob/5aa77fa291abeaf0498f65724000c75da9ab9028/lib/hooks.js#L319">View code</a>
A hook that is run before a find (select) query</p>
<p><strong>Params:</strong></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>String</td>
<td></td>
</tr>
<tr>
<td>fn</td>
<td>Function</td>
<td>A callback function that is called with options, callback(err)</td>
</tr>
</tbody>
</table>
<hr>
<p><a name="beforefindafterexpandincludeall"></a></p>
<h2 id="beforefindafterexpandincludeallname-fn"><code>beforeFindAfterExpandIncludeAll(name, fn)</code></h2>
<p><a href="https://github.com/sequelize/sequelize/blob/5aa77fa291abeaf0498f65724000c75da9ab9028/lib/hooks.js#L328">View code</a>
A hook that is run before a find (select) query, after any { include: {all: ...} } options are expanded</p>
<p><strong>Params:</strong></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>String</td>
<td></td>
</tr>
<tr>
<td>fn</td>
<td>Function</td>
<td>A callback function that is called with options, callback(err)</td>
</tr>
</tbody>
</table>
<hr>
<p><a name="beforefindafteroptions"></a></p>
<h2 id="beforefindafteroptionsname-fn"><code>beforeFindAfterOptions(name, fn)</code></h2>
<p><a href="https://github.com/sequelize/sequelize/blob/5aa77fa291abeaf0498f65724000c75da9ab9028/lib/hooks.js#L337">View code</a>
A hook that is run before a find (select) query, after all option parsing is complete</p>
<p><strong>Params:</strong></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>String</td>
<td></td>
</tr>
<tr>
<td>fn</td>
<td>Function</td>
<td>A callback function that is called with options, callback(err)</td>
</tr>
</tbody>
</table>
<hr>
<p><a name="afterfind"></a></p>
<h2 id="afterfindname-fn"><code>afterFind(name, fn)</code></h2>
<p><a href="https://github.com/sequelize/sequelize/blob/5aa77fa291abeaf0498f65724000c75da9ab9028/lib/hooks.js#L346">View code</a>
A hook that is run after a find (select) query</p>
<p><strong>Params:</strong></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>String</td>
<td></td>
</tr>
<tr>
<td>fn</td>
<td>Function</td>
<td>A callback function that is called with instance(s), options, callback(err)</td>
</tr>
</tbody>
</table>
<hr>
<p><a name="beforedefine"></a></p>
<h2 id="beforedefinename-fn"><code>beforeDefine(name, fn)</code></h2>
<p><a href="https://github.com/sequelize/sequelize/blob/5aa77fa291abeaf0498f65724000c75da9ab9028/lib/hooks.js#L355">View code</a>
A hook that is run before a define call</p>
<p><strong>Params:</strong></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>String</td>
<td></td>
</tr>
<tr>
<td>fn</td>
<td>Function</td>
<td>A callback function that is called with attributes, options, callback(err)</td>
</tr>
</tbody>
</table>
<hr>
<p><a name="afterdefine"></a></p>
<h2 id="afterdefinename-fn"><code>afterDefine(name, fn)</code></h2>
<p><a href="https://github.com/sequelize/sequelize/blob/5aa77fa291abeaf0498f65724000c75da9ab9028/lib/hooks.js#L364">View code</a>
A hook that is run after a define call</p>
<p><strong>Params:</strong></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>String</td>
<td></td>
</tr>
<tr>
<td>fn</td>
<td>Function</td>
<td>A callback function that is called with factory, callback(err)</td>
</tr>
</tbody>
</table>
<hr>
<p><a name="beforeinit"></a></p>
<h2 id="beforeinitname-fn"><code>beforeInit(name, fn)</code></h2>
<p><a href="https://github.com/sequelize/sequelize/blob/5aa77fa291abeaf0498f65724000c75da9ab9028/lib/hooks.js#L373">View code</a>
A hook that is run before Sequelize() call</p>
<p><strong>Params:</strong></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>String</td>
<td></td>
</tr>
<tr>
<td>fn</td>
<td>Function</td>
<td>A callback function that is called with config, options, callback(err)</td>
</tr>
</tbody>
</table>
<hr>
<p><a name="afterinit"></a></p>
<h2 id="afterinitname-fn"><code>afterInit(name, fn)</code></h2>
<p><a href="https://github.com/sequelize/sequelize/blob/5aa77fa291abeaf0498f65724000c75da9ab9028/lib/hooks.js#L382">View code</a>
A hook that is run after Sequelize() call</p>
<p><strong>Params:</strong></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>String</td>
<td></td>
</tr>
<tr>
<td>fn</td>
<td>Function</td>
<td>A callback function that is called with sequelize, callback(err)</td>
</tr>
</tbody>
</table>
<hr>
<p><em>This document is automatically generated based on source code comments. Please do not edit it directly, as your changes will be ignored. Please write on <a href="/v2/irc://irc.freenode.net/#sequelizejs">IRC</a>, open an issue or a create a pull request if you feel something can be improved. For help on how to write source code documentation see <a href="http://usejsdoc.org">JSDoc</a> and <a href="https://github.com/tj/dox">dox</a></em></p>
            </div>
          </div> 
          <footer>
  

  <hr>

  <div role="contentinfo">
    <p>
    <!-- Copyright etc -->
    </p>
  </div>

  Built with <a href="http://www.mkdocs.org">MkDocs</a>, using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
	  
        </div>
      </div>

    </section>

  </div>

<div class="rst-versions" role="note" style="cursor: pointer">
    <span class="rst-current-version" data-toggle="rst-current-version">
        
      <span><a href="/v2/" style="color: #fcfcfc;">« Previous</a></span>
      <span style="margin-left: 15px"><a href="/v2/" style="color: #fcfcfc">Next »</a></span>
    </span>
</div>

</body></html>